import java.util.Scanner;

public class two {
    public static void main(String[] args) {
        System.out.println("请输入n");
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        for (int i=2;i<a;i++)
        {
        if(isture(i)){
            System.out.println(i);
        }
        }
    }
    public static boolean isture(int num){
        for(int j= 2;j < num;j++){
            if(num % j ==0){
                return false; }
        }
        return true;
    }
}
